package code.command {

import code.event.ViewTopicEvent;
import code.view.ViewTopicPopup;

import com.adobe.cairngorm.commands.ICommand;
import com.adobe.cairngorm.control.CairngormEvent;

import logging.Logger;

public class ViewTopicCommand implements ICommand {
	
	private static const LOG: Logger = Logger.getLogger("code.command.ViewTopicCommand");
	
	public function ViewTopicCommand() {
	}

	public function execute(_event: CairngormEvent):void {
		const event: ViewTopicEvent = _event as ViewTopicEvent;
		LOG.fine("Executing view topic [event="+event+"].");
		
		const popup: ViewTopicPopup = new ViewTopicPopup();
		popup.topic = event.topic;
		// popup.addEventListener(PopupClosedEvent.POPUP_CONFIRMED, onPopupConfirmed);
		popup.doDisplay();
		
		
	}
	
}
}